Data storage systems are arrangements of hardware and software that include one or more storage processors coupled to arrays of non-volatile storage devices, such as magnetic disk drives, electronic flash drives, and/or optical drives, for example. The storage processors service storage requests, arriving from host machines (“hosts”), which specify files or other data elements to be written, read, created, or deleted, for example. Software running on the storage processors manages incoming storage requests and performs various data processing tasks to organize and secure the data elements stored on the non-volatile storage devices.
Data storage systems commonly arrange data in file systems. File systems include both data and metadata. The metadata organizes file data on disk, such that each file's data can be located, placed in proper sequence, and kept separate from other files' data. File systems often store both their data and metadata in blocks, where a “block” is typically the smallest unit of storage that the file system can allocate and manage. A file system may support blocks of a particular size, such as 4 KB, 8 KB, etc., and some file systems may support multiple block sizes.
Examples of file system metadata include inodes (index nodes), indirect blocks (IBs), and block metadata (BMD). Inodes are provided one per file and store per-file metadata, such as a file's ownership and size, as well as pointers to data blocks that store the file's data. Each inode has a unique inode number in the file system. Typically, an inode stores one or more pointers to IBs, where each IB stores an array of block pointers, such as 1024 block pointers, for example. The block pointers in an IB may point directly to data blocks storing file data, or they may point to other IBs, effectively forming an IB tree. BMD is provided one per data block and may be used for certain metadata blocks, as well. Typically, BMD for multiple data blocks are stored in a single block. The BMD for each data block stores, for example, the inode number of the file that first allocated the data block, a logical address into that file where the data block was allocated, a checksum of the data block's contents, and a reference weight.
In an example, the reference weight in a BMD is a total distributed weight, meaning that its value equals the sum of one or more delegated weights. The delegated weights are stored in block pointers that point to the data block associated with the BMD. For example, if only a single block pointer points to a data block and has a delegated weight of 1000, then the BMD for that data block will typically have a total distributed weight of 1000, as well. In this manner, it can readily be determined that the data block is owned by the block pointer by confirming that the two weights are equal. However, if two block pointers, each having a weight of 500, each point to a data block whose BMD has a total distributed weight of 1000, then it can be determined that the data block is shared by inspecting either of the two block pointers and the BMD, and confirming that the weight in the BMD exceeds the weight in the block pointer.